#include <stdio.h>

float average(float *pa);
int main()
{
	float sco[5], avg, *sp;
	int i;
	sp = sco;
	printf("\ninput 5 scores:\n");
	for (i = 0; i < 5; i++)
		scanf("%f", &sco[i]);
	avg = average(sp);
	printf("average score is %5.2f", avg);
}
float average(float *pa)
{
	int i;
	float avg, s = 0;
	for (i = 0; i < 5; i++)
		s = s + *pa++;
	avg = s / 5;
	return avg;
}


